Rahsaan Page wrote:
Hello Everybody,
I am trying to write a file Explorer program in Java, i go the Frame, Basic
Menu and Tree going. But now i have the C: listed and i need some help
expanding and collaping the HDD to se Folders and Files contained in there
C:..
Help is greatly apprciated..
Thanks
--Rahsaan
You should probably implement a TreeNode extended class to wrap
java.io.File objects and implement the TreeWillExpandListener. Then when
you get the treeWillExpand event you check which File object the user is
trying to expand and then just list the files under that object,
creating TreeNode objects for each and tell the tree that the node has
been updated.